void CCmdChannel::OnReceiveCmd(LPBYTE pdata, INT ilen)
	HandleOpenChannelReq(pdata, ilen);
		rv = m_pSink->OnChannelRequest(UPTYPE_ADD, info, CRtAutoPtr<CChannel>(this));
			switch (type)
			case UPTYPE_ADD:
				rv = m_pSessMgr->AddStreamResource(Proc_RTMP, refInfo);
					RtResult CSessionMgr::AddStreamResource(DWORD dwProtocol, const st_StreamInfo& refInfo)
						rv = AddSession(refInfo, dwProtocol, psession);
							switch(dwProtocol)
							case Proc_RTMP:
								psession = new CRtmpSession(this, refInfo);
							m_mapSession[refInfo.m_strUrl] = psession;
						rv = psession->Initialize(m_AudioFormatsEnc, m_VideoFormatsEnc);
end

RtResult CSessionMgr::Initialize(const VecAudioFormat& refAudioF, const VecVideoFormat& refVideoF)
	rv = AddStreamResource(Proc_RTMP, info);



RtResult CRtmpSession::Initialize(const VecAudioFormat& vecAF, const VecVideoFormat& vecVF)
	CSession::Initialize(vecAF, vecVF);
	AddAudioOutFormat(vecAF[i]);
	AddVideoOutFormat(vecVF[i]);
	createDecThread();
	m_Timer.Schedule(this, tvInterval);
end






















